package com.example.spring.service;

import com.example.spring.dao.UserDao;
import com.example.spring.dao.VipDao;

/**
 * ClassName:CustomerService
 * Package:com.example.spring.service
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/8-14:31
 * @Version:v1.0
 */
//基于构造方法注入
public class CustomerService {
    private UserDao userDao;

    private VipDao vipDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void setVipDao(VipDao vipDao) {
        this.vipDao = vipDao;
    }

//    public CustomerService(UserDao userDao, VipDao vipDao) {
//        this.userDao = userDao;
//        this.vipDao = vipDao;
//    }

    public void save(){

        userDao.insert();
        vipDao.insert();
    }
}
